import qs from "qs"
// 请求  登录/查询接口
import request from "./request"

//  请求精品数据
export const JinpApi = () => request.get("/products/recommend");

// 请求热门兑换
export const HotApi = () => request.get("/products/hot")

//  获取短信验证码
export const SendSMSAPI = params => request.post("/sendSMS", qs.stringify(params))
// 手机号验证码登陆接口
export const phoneReginAPI = params => request.post("/phoneRegin", qs.stringify(params))
// 微信扫码登录接口
export const winxinloginAPI = params => request.post("/wechatUsers/PCLogin", qs.stringify(params))

//  手机绑定微信  /wechatUsers/binding
export const bingPhoneAPI = params => request.post("/wechatUsers/binding", qs.stringify(params))
// 请求用户信息
export const userProfilesAPI = () => request.get("/shop/userProfiles")

// 商品详情页面
export const GoodsDetailAPI = (id) => request.get(`/products/${id}`);
// 加入到购物车
export const CartAPI = params => request.post("/shop/carts/add", qs.stringify(params))
// 商品搜索
export const SerchAPI = (params) => request.get("/products", { params })
// 查看购物车
export const LookCartAPI = () => request.get("/shop/carts")
// 删除购物车数据
export const CartDelApi = (params) => request.delete(`/shop/carts?productIds=${params}`);





